{% extends "base.html" %}
{% block title %}
Edit Event '{{event.name}}'
{% endblock %}

{% block content %}
<script language="javascript" type="text/javascript" src="/static/datetime/datetimepicker.js"></script>
<h1>Edit Event '{{event.name}}'</h1>
<form action="/edit" method="post">
    <table>
        <tr><td>Event Name:<td><input name="name" value="{{event.name}}"></tr>
        <tr><td>Tagline:<td><input name="tagline" value="{{event.tagline}}"></tr>
        <tr><td>Description:<td><textarea name="description">{{event.description}}</textarea></tr>
		<tr><td>Start Time:<td><input name="starttime" id="starttime" value='{{event.starttime}}'><a href="javascript:NewCal('starttime','yyyymmdd',true,24)"><img src="/static/datetime/cal.gif" width="16" height="16" border="0" alt="Pick a date"></a></tr>
		<tr><td>Finish Time:<td><input name="endtime" id="endtime" value='{{event.endtime}}'><a href="javascript:NewCal('endtime','yyyymmdd',true,24)"><img src="/static/datetime/cal.gif" width="16" height="16" border="0" alt="Pick a date"></a></tr>
        <tr><td>Random Number:<td><input name="rand" value="{{event.rand}}"></tr>
        <tr><td>Claim Ownership:<td><input type="checkbox" name="own" {% if isowner %}checked{% endif %}</tr>
        <tr><td>URL:<td><input name='url' value="{{event.url}}"></tr>
    </table>
    <input type="hidden" name="key" value="{{event.key}}">
    {% if not canedit %}
      <p>You can't edit this record.</p>
      <p>(TODO:  blank out the entire record editing thing?)</p>
    {% endif %}
    <input type="submit" value="Stubmit">
</form>
{% endblock %}


